package com.mmz.test.sort;

public class BubbleSort {

	public static void main(String[] args) {
		int[] arr={2,1,54,21,45,-12,67,2,-34,0};
		for(int i=0;i<arr.length;i++){
			for(int j=i+1;j<arr.length;j++){
				if(arr[i]>arr[j]){
					int temp = arr[i];
					arr[i] = arr[j];
					arr[j] = temp;
				}
			}
		}
		
		for(int i=0;i<arr.length;i++){
			System.out.println(arr[i]);
		}

	}

}
